package com.terrynoya.fight.stateMachine.controllers.attrParser
{
	import com.terrynoya.fight.combat.FightEngine;
	import com.terrynoya.fight.evaluation.Expression;
	import com.terrynoya.fight.evaluation.Node;
	import com.terrynoya.fight.io.KeyValuePair;
	import com.terrynoya.fight.stateMachine.StateController;

	public class ExpressionConvert implements IStateCtrlAttrParser
	{
		public function ExpressionConvert()
		{
			
		}
		
		public function parse(ctrl:StateController,vo:KeyValuePair,engine:FightEngine):void
		{
			var node:Node = engine.evalSystem.createExpression(vo.value);
			ctrl.expressions.put(vo.key,new Expression(node,vo.value));
		}
	}
}